﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;
using Metro.Kashikoi.ServiceContract.Location;

namespace Metro.Kashikoi.ServiceContract.Security
{
   [DataContract(IsReference = true)]
    public class AuthorizationArea
    {
        [DataMember]
        [Key]
        public int Id { get; set; }

        [DataMember]
        [StringLength(255, MinimumLength = 1)]
        [StringLengthValidator(1, 255)]
        public string Name { get; set; }

        [DataMember]
        public virtual ICollection<Region> RegionList { get; set; }

        [DataMember]
        public int RegionId { get; set; }


        //[DataMember]
        //public int LocationId { get; set; }
        
        //[DataMember]
        //public int LocationCode { get; set; }

        //[DataMember]
        //public LocationTypes LocationType
        //{
        //    get
        //    {
        //        return (LocationTypes)LocationCode;
        //    }
        //    set
        //    {
        //        LocationCode = (int)value;
        //    }
        //}


       //public enum LocationTypes
       // {
       //     Organization = 0,
       //     Facility = 1,
       //     Unit = 2,
       //     StockArea = 3,
       // }
    }
}
